<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<style>
    body{
        height: 5000px;
    }
    img{
        width: 300px;
    }
</style>
<img src="../images/img1.jpg" alt="">
<body>
<script>
    document.addEventListener('click',function (e) {
        console.log(e.clientX+'X坐标');
        console.log(e.clientY+'Y坐标');
        console.log('--------------------');
        console.log(e.pageX+'X坐标');
        console.log(e.pageY+'Y坐标');
        console.log('--------------------');
    })
</script>
</body>
</html>